<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
    $this->LoadHead();
    $this->Html->LoadCss("base");
    $this->Html->LoadCss("base_red");
    $this->Html->LoadCss("style");
    $this->Html->LoadCss("ocorrencias");
    $this->Html->LoadCss("grupos");
    $this->Html->LoadCss("calendario");
    $this->Html->LoadCss("messages");
    $this->Html->LoadCss("usuarios");
    $this->Html->LoadCss("modifications");
    $this->Html->LoadCss("plugins/menu/treeview");
?>

<body>

<!-- general-outer -->
<div id="general-outer">

    <!--header -->
    <div id="header-wrap">
        <div id="header">
        
            <div id="nav">
                <?php $this->LoadRegion("menu-superior"); ?>
            </div>
            
        </div>
    </div>

    <!-- content-outer -->
    <div id="content-wrap">

       <!-- content -->
       <div id="content">
           <div id="response">
               <?php 
                    $this->LoadMessages();
                    $this->LoadRegion("page-top"); 
               ?>
           </div>
           
            <!-- main -->
            <div id="esq">
            <?php 
            if(isset($menu)){
                if(!empty ($menu)){
                    if(isset($menu_title))echo "<h3 id='menu_title'>$menu_title</h3>";
                    $this->LoadJsPlugin("menu/multiple", "ms"); 
                    $this->ms->draw($menu);
                }
            }
            
            $this->LoadRegion("menu-lateral");
            ?>
            </div>

            <div id="main-dir">
                <div id="main" class="clearfix">
                    <?php
                        $this->LoadRegion("body-top");
                        $this->Load("body");
                     ?>
                <!-- /main -->
                <div class="clear"></div>
                </div>
                <div id="dir">
                        <?php $this->Load("Apoio");?>
                </div>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        <!-- content -->
        </div>
        <div class="clear"></div>
        
    <!-- /content-out -->
    </div>
	<div class="clear"></div>
	
</div>
<!-- /general-outer -->	
    
    <!-- footer-outer-->
    <div id="footer-outer" style="color: #c6c6c6; text-align: center;">
        <div id="rodape-faixa" class="faixa" style="padding-top: 10px;">
            <span><?php $this->Html->LoadImage("tenap.png");?></span>
            <span style="padding-left: 10px"><?php echo SITE_SLOGAN; ?></span>
        </div>
        <div id="rodape-info">
            <?php if(SITE_EMAIL    != ""){?><span class="rodape-destaque">Email: </span><?php echo SITE_EMAIL; ?><?php }?>
            <?php if(SITE_TELEFONE != ""){?><span class="rodape-destaque">Telefone: </span><?php echo SITE_TELEFONE; ?><?php }?>
            <?php if(SITE_ENDERECO != ""){?><span class="rodape-destaque">Unidade Física: </span><?php echo SITE_ENDERECO; ?><?php }?>
        </div>
    </div>
    <!-- /footer-outer -->

</body>
</html>
<script>
	var fixHeight = function() {
		console.log("Correcting height...");
		var heightEsq = $("#content #esq").outerHeight();
		var heightDir = $("#content #main-dir").outerHeight();
		if(heightDir<heightEsq) {
			$("#content #main-dir").height(heightEsq);
		}
	}
	$(function() {
		
		fixHeight();
	
	});
</script>
